<template>
  <div class="router-view">
    <router-view />
  </div>
  <!-- 底部版权 -->
  <!-- <CopyRight /> -->
  <div style="height: 60px;"></div>
  <van-tabbar route v-show="visible">
    <van-tabbar-item replace to="/" icon="home-o">首页</van-tabbar-item>
    <van-tabbar-item replace to="/login" icon="search">登录</van-tabbar-item>
    <van-tabbar-item replace to="/my" icon="user-o">我的</van-tabbar-item>
  </van-tabbar>
</template>
<script setup lang="ts">
// import CopyRight from "./components/CopyRight.vue";
import { watch, ref,Ref } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
const visible:Ref<boolean> = ref<boolean>(true);
watch(() => route.path, () => {
  if (route.path == '/login') {
    visible.value = false;
  } else {
    visible.value = true;
  }
},{
  immediate:true
})
</script>
<style>
.router-view {
  min-height: 400px;
}
</style>
